package tasarim_prensipleri;

public abstract class Printer {
	private String type;

	private Fax fax;

	public void fax() {
        getFax().fax();//getFax metodu ile ilgili nesnenin intansı elde edilmiş oluyor
	}

	public Fax getFax() {
		return fax;
	}

	public void setFax(Fax fax) {
		this.fax = fax;
	}

	public Printer() {
		
	}

	public Printer(String type) {
		setType(type);
	}
     
	public void print(){
		System.out.println("Printed with "+getType());
	}
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}
